package com.antler.smt.portal.mapper;

import com.antler.smt.entity.PurchaserEntity;
import com.antler.smt.response.admin.GetPurchaserListResp;
import org.springframework.stereotype.Repository;


/**
 *  采购商Mapper
 *
 * @author zhangyi
 * @date 2018/3/27 13:56
 */
@Repository
public interface PurchaserInfoMapper {

    /**
     * 根据会员id查询采购商
     *
     * @param memberId
     * @return
     */
    GetPurchaserListResp selectByMemberId(Long memberId);

    /**
     * 更新客户实体
     *
     * @param purchaserEntity
     * @return
     */
    int updatePurchaserInfo(PurchaserEntity purchaserEntity);

    /**
     * 获取用户认证审核状态成功的实体
     *
     * @param memberId
     * @return
     */
    GetPurchaserListResp selectAuditByMemberId(Long memberId);

    /**
     * 获取审核后的总金额
     *
     * @param memberId
     * @return
     */
    Long getAllAuditMoney(Long memberId);

    /**
     * 获取星级
     *
     * @param memberId
     * @return
     */
    Integer getStarLevel(Long memberId);
}
